import App from "../App";
import Article from "../pages/Article";
import Login from "../pages/Login";
import Register from "../pages/Register";
import {BrowserRouter as Router,Routes,Route } from 'react-router-dom'
import {Navigate} from  'react-router-dom'
import Edit from "../pages/Edit"
import Index from "../pages/Index"
import ViewArticle from "../pages/ViewArticle"
import Comment from"../pages/Comments"
import Means from "../pages/Means"
import Test from "../pages/test"
import ListArticle from "../pages/ListArticle"
const BaseRouter=()=>(
    <Router>
        <Routes>
            <Route path="/" element= {<App/>} >
                <Route path="/article" element={<Article />}/>
                <Route path="/means" element={<Means/>}></Route>
                <Route path="/edit:id" element={<Edit/>}></Route>
                <Route path='/edit' element={<Edit />}></Route>  
            </Route>
            <Route path="/index" element={<Index/>}>
            <Route path="listArticle" element={<ListArticle/>}/>
            <Route path="view:id" element={<ViewArticle/>}/>        
            </Route>
            <Route path="/login" element={<Login />}>
            </Route>
            {/*<Route path="/" element={<Login />}/>*/}
            <Route path="/register" element={<Register />}/>
            <Route path="/test" element={<Test />}/> 
            <Route path="/comment" element={<Comment/>} />    
        </Routes>
        
        
           
        
        <Routes>

        </Routes>
    </Router>
)

export default BaseRouter
